Skip to content

Conversation

@OtavioStasiak
Copy link
Contributor

@OtavioStasiak OtavioStasiak commented Jul 23, 2025

Proposed changes

  • Adjust the accessibilityRole of the switch and radio buttons.
  • Create a ListRadio component to avoid repeating code.
  • Fix a small typo (wrong accessibility props).
  • Create a Channel.

Issue(s)

https://rocketchat.atlassian.net/browse/MA-181
https://rocketchat.atlassian.net/browse/MA-120
https://rocketchat.atlassian.net/browse/MA-179
https://rocketchat.atlassian.net/browse/MA-178
https://rocketchat.atlassian.net/browse/MA-118

How to test or reproduce

  • Open the app;
  • Turn screen reader on;
  • Navigate through ThemeView, LanguageView, DefaultBrowserView, MediaAutoDownloadView;
  • Create a channel;
  • Create a discussion;

Screenshots

Before After
Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 28 31 Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 20 02
Before After
Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 31 53 Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 40 31
Before After
Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 32 44 Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 22 10
Before After
Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 34 03 Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 21 51
Before After
Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 37 08 Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 22 20
Before After
Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 38 16 Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 22 49
Before After
Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 39 39 Simulator Screenshot - iPhone 16 - 2025-11-21 at 18 22 30
SelectedUsersList Tablet Portrait SelectedUsersList Tablet Landscape
Simulator Screenshot - iPad Pro 11-inch (M4) - 2025-12-16 at 13 29 46 Simulator Screenshot - iPad Pro 11-inch (M4) - 2025-12-16 at 13 29 40

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Summary by CodeRabbit

  • New Features

    • Radio-style selection UI added across multiple lists
    • New SelectedUsers component for chip-based selected-user display
  • Improvements

    • Streamlined user-selection flows for discussions/channels
    • Enhanced accessibility: proper semantic roles and iOS state announcements
    • Replaced several list item UIs with unified radio components
  • Bug Fixes

    • Corrected accessibility label prop name typos across many screens

✏️ Tip: You can customize this high-level summary in your review settings.

@OtavioStasiak OtavioStasiak changed the title feat(a11y): adjust name and role of multi select feat(a11y): adjust the name and role of the multi-select Jul 23, 2025
@OtavioStasiak OtavioStasiak had a problem deploying to official_android_build July 23, 2025 18:10 — with GitHub Actions Failure
@OtavioStasiak OtavioStasiak temporarily deployed to experimental_ios_build July 23, 2025 18:10 — with GitHub Actions Inactive
@OtavioStasiak OtavioStasiak temporarily deployed to experimental_android_build July 23, 2025 18:10 — with GitHub Actions Inactive
@OtavioStasiak OtavioStasiak had a problem deploying to upload_experimental_android July 23, 2025 18:44 — with GitHub Actions Failure
@github-actions
Copy link

Android Build Available

Rocket.Chat Experimental 4.63.0.87803

Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNRmNP2n5D8tH5dsgkCR4MeyJoGDkRo1m2ELCzPvQv_2bHRGcoC7am1O7z0uztkuU4Oddavp5CSM6IpgT4Km

@github-actions
Copy link

iOS Build Available

Rocket.Chat Experimental 4.63.0.87803

@OtavioStasiak OtavioStasiak temporarily deployed to experimental_ios_build August 5, 2025 17:59 — with GitHub Actions Inactive
@OtavioStasiak OtavioStasiak temporarily deployed to experimental_android_build August 5, 2025 17:59 — with GitHub Actions Inactive
@OtavioStasiak OtavioStasiak had a problem deploying to upload_experimental_android August 5, 2025 19:01 — with GitHub Actions Error
@github-actions
Copy link

github-actions bot commented Aug 5, 2025

Android Build Available

Rocket.Chat Experimental 4.64.0.93303

Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNQrJFoEa-W0ny1Rv6Sxz60pTzlLW6px_P593THuf7cfDZo-G2QA8ZddGhq2_S6ir0B6DsTtkRM2zGaHGUjT

@github-actions
Copy link

github-actions bot commented Aug 5, 2025

iOS Build Available

Rocket.Chat Experimental 4.64.0.100081

@OtavioStasiak OtavioStasiak had a problem deploying to experimental_android_build December 29, 2025 17:15 — with GitHub Actions Error
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (3)
.maestro/tests/assorted/join-from-directory.yaml (3)

29-30: Consider reducing the animation timeout.

A 10-second timeout for waitForAnimationToEnd is quite long. If this was added to address test flakiness, consider whether a shorter duration (e.g., 2-3 seconds) would suffice, which would improve test execution time.


100-103: Consider adding state-change verification and initial state setup.

The test now relies on the accessibility label format 'Users unselected', which makes it more brittle. Additionally:

  1. The test assumes 'Users' starts unselected but doesn't explicitly verify or set the initial filter state.
  2. After tapping 'Users unselected' (line 103), there's no verification that the filter actually changed state (e.g., checking for 'Users selected' or verifying the directory content changed).

This could lead to flakiness if:

  • The label format changes (e.g., to '☐ Users' or 'Users (unselected)')
  • Previous tests or saved state leave 'Users' already selected
  • The tap doesn't successfully change the filter
Consider adding verification steps

After line 103, add a step to verify the filter changed:

- extendedWaitUntil:
    visible:
      text: 'Users selected'
    timeout: 5000

Or verify the filter menu closed and directory content reflects the Users filter.


148-151: Same concerns as the 'Users unselected' change above.

This has the same brittleness and missing verification issues as the 'Users unselected' change in lines 100-103. After tapping 'Teams unselected' (line 151), consider adding verification that the filter state changed to 'Teams selected' or that the directory content reflects the Teams filter.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between fdb45af and 363d7f5.

📒 Files selected for processing (1)
  • .maestro/tests/assorted/join-from-directory.yaml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: OtavioStasiak
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6499
File: app/containers/ServerItem/index.tsx:34-36
Timestamp: 2025-12-17T15:56:22.578Z
Learning: In the Rocket.Chat React Native codebase, for radio button components on iOS, include the selection state ("Selected"/"Unselected") in the accessibilityLabel instead of using accessibilityState={{ checked: hasCheck }}, because iOS VoiceOver has known issues with accessibilityRole="radio" + accessibilityState that prevent correct state announcement.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: E2E Build iOS / ios-build
  • GitHub Check: E2E Build Android / android-build
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: format

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
app/views/CreateDiscussionView/index.tsx (1)

49-51: Stale state issue remains unresolved.

The previous review comment about state synchronization is still applicable. The local users state (line 69) is initialized from Redux selectedUsers once at mount but never synchronizes with subsequent Redux updates. If a user navigates away to add more users and returns, the UI will show stale data.

Please refer to the previous review comment for recommended solutions (use Redux state directly or add a useEffect to sync).

Also applies to: 98-100, 116, 181

Also applies to: 53-53, 63-64, 69-69

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 363d7f5 and 19ddc06.

⛔ Files ignored due to path filters (1)
  • app/containers/List/__snapshots__/List.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • app/containers/List/List.stories.tsx
  • app/containers/SelectedUsers/index.tsx
  • app/containers/ServerItem/index.tsx
  • app/views/CreateChannelView/index.tsx
  • app/views/CreateDiscussionView/index.tsx
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/views/CreateChannelView/index.tsx
  • app/containers/List/List.stories.tsx
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: OtavioStasiak
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6499
File: app/containers/ServerItem/index.tsx:34-36
Timestamp: 2025-12-17T15:56:22.578Z
Learning: In the Rocket.Chat React Native codebase, for radio button components on iOS, include the selection state ("Selected"/"Unselected") in the accessibilityLabel instead of using accessibilityState={{ checked: hasCheck }}, because iOS VoiceOver has known issues with accessibilityRole="radio" + accessibilityState that prevent correct state announcement.
📚 Learning: 2025-12-17T15:56:22.578Z
Learnt from: OtavioStasiak
Repo: RocketChat/Rocket.Chat.ReactNative PR: 6499
File: app/containers/ServerItem/index.tsx:34-36
Timestamp: 2025-12-17T15:56:22.578Z
Learning: In the Rocket.Chat React Native codebase, for radio button components on iOS, include the selection state ("Selected"/"Unselected") in the accessibilityLabel instead of using accessibilityState={{ checked: hasCheck }}, because iOS VoiceOver has known issues with accessibilityRole="radio" + accessibilityState that prevent correct state announcement.

Applied to files:

  • app/containers/ServerItem/index.tsx
  • app/views/CreateDiscussionView/index.tsx
🧬 Code graph analysis (1)
app/views/CreateDiscussionView/index.tsx (2)
app/reducers/selectedUsers.ts (1)
  • ISelectedUser (4-11)
app/actions/selectedUsers.ts (1)
  • removeUser (25-30)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: ESLint and Test / run-eslint-and-test
  • GitHub Check: format
🔇 Additional comments (8)
app/containers/ServerItem/index.tsx (4)

5-5: LGTM! Import style matches maintainer preference.

The namespace import import * as List is the preferred style as suggested in previous reviews, and it supports the refactored icon usage.


34-36: Excellent! Correctly implements iOS VoiceOver workaround.

The implementation correctly includes the selection state ("Selected"/"Unselected") directly in the accessibilityLabel instead of using accessibilityState={{ checked: hasCheck }}. This approach works around the known iOS VoiceOver issues with accessibilityRole="radio" + accessibilityState, ensuring proper state announcement for screen reader users on iOS.

The use of computed constants (iconName, iconColor) also improves code readability.

Based on learnings, this is the correct approach for iOS compatibility.


44-46: LGTM! Accessibility props properly configured.

The accessibility implementation is correct:

  • accessibilityRole='radio' provides proper semantic identification
  • accessibilityLabel includes both identifying information and state
  • accessibilityHint guides user interaction
  • Correctly avoids accessibilityState per iOS VoiceOver compatibility requirements

This addresses the PR objectives (MA-120: correct radio button role in menus).


73-74: LGTM! Clean refactoring to List.Icon.

The refactoring from a dedicated Radio component to List.Icon improves consistency across the codebase. The icon appearance (radio-checked/unchecked with appropriate colors) is maintained through the computed constants, and this aligns with the PR objective to consolidate components and reduce code duplication.

app/views/CreateDiscussionView/index.tsx (4)

30-31: LGTM!

The new imports correctly support the integration of the SelectedUsers component and proper typing for user data.


145-146: LGTM!

The background color update to surfaceTint provides consistent theming across the view.


176-176: Good catch on the accessibility typo!

Correcting additionalAcessibilityLabel to additionalAccessibilityLabel improves code correctness and aligns with proper accessibility implementation.


181-181: SelectedUsers integration looks correct.

The component is properly integrated with appropriate props. However, note that the removeUser callback signature matches the interface issue identified in app/containers/SelectedUsers/index.tsx (where the interface should be updated to reflect that onPress receives an ID string, not the full item).

Once the interface fix in SelectedUsers is applied, verify this usage still compiles correctly.

@OtavioStasiak OtavioStasiak requested a deployment to official_android_build December 30, 2025 00:32 — with GitHub Actions Waiting
@OtavioStasiak OtavioStasiak requested a deployment to experimental_android_build December 30, 2025 00:32 — with GitHub Actions Waiting
@OtavioStasiak OtavioStasiak requested a deployment to experimental_ios_build December 30, 2025 00:32 — with GitHub Actions Waiting
@diegolmello diegolmello merged commit 6db5ffb into develop Dec 30, 2025
8 of 12 checks passed
@diegolmello diegolmello deleted the feat-a11y-select-discussion branch December 30, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants